.class public Lcom/estrongs/android/ui/dialog/g0;
.super Ljava/lang/Object;
.source "NewFavoriteWebPageDialog.java"


# instance fields
.field private a:Landroid/content/Context;

.field private b:Lcom/estrongs/android/ui/dialog/q;

.field private c:Landroid/view/View;

.field private d:Landroid/widget/EditText;

.field private e:Z

.field private f:Ljava/lang/String;

.field private g:Ljava/lang/String;


# direct methods
.method public constructor <init>(Landroid/content/Context;Z)V
    .locals 0

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    iput-object p1, p0, Lcom/estrongs/android/ui/dialog/g0;->a:Landroid/content/Context;

    .line 3
    iput-boolean p2, p0, Lcom/estrongs/android/ui/dialog/g0;->e:Z

    .line 4
    invoke-direct {p0}, Lcom/estrongs/android/ui/dialog/g0;->b()V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;ZLjava/lang/String;Ljava/lang/String;)V
    .locals 0

    .line 5
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 6
    iput-object p1, p0, Lcom/estrongs/android/ui/dialog/g0;->a:Landroid/content/Context;

    .line 7
    iput-boolean p2, p0, Lcom/estrongs/android/ui/dialog/g0;->e:Z

    .line 8
    iput-object p4, p0, Lcom/estrongs/android/ui/dialog/g0;->f:Ljava/lang/String;

    .line 9
    iput-object p3, p0, Lcom/estrongs/android/ui/dialog/g0;->g:Ljava/lang/String;

    .line 10
    invoke-direct {p0}, Lcom/estrongs/android/ui/dialog/g0;->b()V

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/ui/dialog/g0;)Landroid/view/View;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/ui/dialog/g0;->c:Landroid/view/View;

    return-object p0
.end method

.method static synthetic a(Landroid/content/Context;Ljava/io/File;Ljava/io/File;Ljava/lang/String;)V
    .locals 0

    .line 2
    invoke-static {p0, p1, p2, p3}, Lcom/estrongs/android/ui/dialog/g0;->b(Landroid/content/Context;Ljava/io/File;Ljava/io/File;Ljava/lang/String;)V

    return-void
.end method

.method public static a(Landroid/content/Context;Ljava/lang/String;ZLjava/lang/String;)V
    .locals 4
    .param p1    # Ljava/lang/String;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .param p3    # Ljava/lang/String;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    const v0, 0x7f110690

    const/4 v1, 0x0

    const/4 v2, 0x1

    .line 10
    :try_start_0
    new-instance v3, Ljava/io/File;

    invoke-direct {v3, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 11
    invoke-static {p0, v3}, Lcom/estrongs/android/util/h0;->a(Landroid/content/Context;Ljava/io/File;)Z

    move-result v3

    if-eqz v3, :cond_0

    .line 12
    invoke-virtual {p0, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object p1

    new-array v3, v2, [Ljava/lang/Object;

    aput-object p3, v3, v1

    invoke-static {p1, v3}, Ljava/text/MessageFormat;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p1

    .line 13
    invoke-static {p0, p1, v2}, Lcom/estrongs/android/ui/view/d;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    return-void

    .line 14
    :cond_0
    invoke-static {p1}, Lcom/estrongs/android/util/h0;->g(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    .line 15
    invoke-static {p3, p1}, Lcom/estrongs/android/util/m0;->a(Ljava/lang/String;Ljava/lang/String;)Z

    if-eqz p2, :cond_1

    const p1, 0x7f110954

    .line 16
    invoke-virtual {p0, p1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object p1

    new-array v3, v2, [Ljava/lang/Object;

    aput-object p3, v3, v1

    .line 17
    invoke-static {p1, v3}, Ljava/text/MessageFormat;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p1

    .line 18
    invoke-static {p0, p1, v2}, Lcom/estrongs/android/ui/view/d;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    goto :goto_0

    :cond_1
    const p1, 0x7f11068e

    .line 19
    invoke-virtual {p0, p1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object p1

    new-array v3, v2, [Ljava/lang/Object;

    aput-object p3, v3, v1

    .line 20
    invoke-static {p1, v3}, Ljava/text/MessageFormat;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p1

    .line 21
    invoke-static {p0, p1, v2}, Lcom/estrongs/android/ui/view/d;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    .line 22
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    if-eqz p2, :cond_2

    const p1, 0x7f110770

    .line 23
    invoke-virtual {p0, p1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object p1

    .line 24
    invoke-static {p0, p1, v2}, Lcom/estrongs/android/ui/view/d;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    goto :goto_0

    .line 25
    :cond_2
    new-instance p2, Ljava/lang/StringBuilder;

    invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V

    .line 26
    invoke-virtual {p0, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    new-array v3, v2, [Ljava/lang/Object;

    aput-object p3, v3, v1

    .line 27
    invoke-static {v0, v3}, Ljava/text/MessageFormat;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p3

    invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p3, " "

    invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 28
    invoke-virtual {p1}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    .line 29
    invoke-static {p0, p1, v2}, Lcom/estrongs/android/ui/view/d;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    :goto_0
    return-void
.end method

.method static synthetic b(Lcom/estrongs/android/ui/dialog/g0;)Landroid/content/Context;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/ui/dialog/g0;->a:Landroid/content/Context;

    return-object p0
.end method

.method private b()V
    .locals 4

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/g0;->a:Landroid/content/Context;

    invoke-static {v0}, Lcom/estrongs/android/pop/esclasses/h;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    const v1, 0x7f0c0043

    const/4 v2, 0x0

    .line 3
    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/ui/dialog/g0;->c:Landroid/view/View;

    .line 4
    iget-boolean v0, p0, Lcom/estrongs/android/ui/dialog/g0;->e:Z

    if-eqz v0, :cond_0

    const v0, 0x7f11029e

    goto :goto_0

    :cond_0
    const v0, 0x7f110029

    .line 5
    :goto_0
    iget-boolean v1, p0, Lcom/estrongs/android/ui/dialog/g0;->e:Z

    if-eqz v1, :cond_1

    const v1, 0x7f110042

    goto :goto_1

    :cond_1
    const v1, 0x7f1102a9

    .line 6
    :goto_1
    iget-object v2, p0, Lcom/estrongs/android/ui/dialog/g0;->f:Ljava/lang/String;

    if-eqz v2, :cond_2

    .line 7
    iget-object v2, p0, Lcom/estrongs/android/ui/dialog/g0;->c:Landroid/view/View;

    const v3, 0x7f09055b

    invoke-virtual {v2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/EditText;

    .line 8
    iget-object v3, p0, Lcom/estrongs/android/ui/dialog/g0;->f:Ljava/lang/String;

    invoke-virtual {v2, v3}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 9
    :cond_2
    iget-object v2, p0, Lcom/estrongs/android/ui/dialog/g0;->g:Ljava/lang/String;

    if-eqz v2, :cond_3

    .line 10
    iget-object v2, p0, Lcom/estrongs/android/ui/dialog/g0;->c:Landroid/view/View;

    const v3, 0x7f09055a

    invoke-virtual {v2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/EditText;

    iput-object v2, p0, Lcom/estrongs/android/ui/dialog/g0;->d:Landroid/widget/EditText;

    .line 11
    iget-object v3, p0, Lcom/estrongs/android/ui/dialog/g0;->g:Ljava/lang/String;

    invoke-virtual {v2, v3}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 12
    :cond_3
    new-instance v2, Lcom/estrongs/android/ui/dialog/q$n;

    iget-object v3, p0, Lcom/estrongs/android/ui/dialog/g0;->a:Landroid/content/Context;

    invoke-direct {v2, v3}, Lcom/estrongs/android/ui/dialog/q$n;-><init>(Landroid/content/Context;)V

    invoke-virtual {v2, v1}, Lcom/estrongs/android/ui/dialog/q$n;->b(I)Lcom/estrongs/android/ui/dialog/q$n;

    iget-object v1, p0, Lcom/estrongs/android/ui/dialog/g0;->c:Landroid/view/View;

    .line 13
    invoke-virtual {v2, v1}, Lcom/estrongs/android/ui/dialog/q$n;->a(Landroid/view/View;)Lcom/estrongs/android/ui/dialog/q$n;

    new-instance v1, Lcom/estrongs/android/ui/dialog/g0$b;

    invoke-direct {v1, p0}, Lcom/estrongs/android/ui/dialog/g0$b;-><init>(Lcom/estrongs/android/ui/dialog/g0;)V

    invoke-virtual {v2, v0, v1}, Lcom/estrongs/android/ui/dialog/q$n;->b(ILandroid/content/DialogInterface$OnClickListener;)Lcom/estrongs/android/ui/dialog/q$n;

    const v0, 0x7f110299

    new-instance v1, Lcom/estrongs/android/ui/dialog/g0$a;

    invoke-direct {v1, p0}, Lcom/estrongs/android/ui/dialog/g0$a;-><init>(Lcom/estrongs/android/ui/dialog/g0;)V

    .line 14
    invoke-virtual {v2, v0, v1}, Lcom/estrongs/android/ui/dialog/q$n;->a(ILandroid/content/DialogInterface$OnClickListener;)Lcom/estrongs/android/ui/dialog/q$n;

    .line 15
    invoke-virtual {v2}, Lcom/estrongs/android/ui/dialog/q$n;->a()Lcom/estrongs/android/ui/dialog/q;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/ui/dialog/g0;->b:Lcom/estrongs/android/ui/dialog/q;

    return-void
.end method

.method private static b(Landroid/content/Context;Ljava/io/File;Ljava/io/File;Ljava/lang/String;)V
    .locals 3

    const/4 v0, 0x1

    .line 16
    :try_start_0
    invoke-static {p1}, Lcom/estrongs/android/util/m0;->c(Ljava/io/File;)Lcom/estrongs/android/pop/app/shortcut/ShortcutFormat;

    move-result-object v1

    .line 17
    iput-object p3, v1, Lcom/estrongs/android/pop/app/shortcut/ShortcutFormat;->targetLocation:Ljava/lang/String;

    .line 18
    invoke-virtual {p2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object p3

    .line 19
    invoke-virtual {p2}, Ljava/io/File;->exists()Z

    move-result v2

    if-eqz v2, :cond_0

    .line 20
    invoke-virtual {p2}, Ljava/io/File;->delete()Z

    .line 21
    :cond_0
    invoke-virtual {p1}, Ljava/io/File;->delete()Z

    .line 22
    invoke-virtual {p2}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object p1

    iput-object p1, v1, Lcom/estrongs/android/pop/app/shortcut/ShortcutFormat;->shortcutName:Ljava/lang/String;

    .line 23
    new-instance p1, Ljava/io/File;

    invoke-direct {p1, p3}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-static {v1, p1}, Lcom/estrongs/android/util/m0;->a(Lcom/estrongs/android/pop/app/shortcut/ShortcutFormat;Ljava/io/File;)V

    const p1, 0x7f110954

    .line 24
    invoke-virtual {p0, p1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object p1

    new-array p3, v0, [Ljava/lang/Object;

    const/4 v1, 0x0

    .line 25
    invoke-virtual {p2}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object p2

    aput-object p2, p3, v1

    .line 26
    invoke-static {p1, p3}, Ljava/text/MessageFormat;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p1

    .line 27
    invoke-static {p0, p1, v0}, Lcom/estrongs/android/ui/view/d;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    const p1, 0x7f110770

    .line 28
    invoke-virtual {p0, p1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object p1

    .line 29
    invoke-static {p0, p1, v0}, Lcom/estrongs/android/ui/view/d;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    :goto_0
    return-void
.end method

.method static synthetic c(Lcom/estrongs/android/ui/dialog/g0;)Z
    .locals 0

    .line 1
    iget-boolean p0, p0, Lcom/estrongs/android/ui/dialog/g0;->e:Z

    return p0
.end method

.method static synthetic d(Lcom/estrongs/android/ui/dialog/g0;)Ljava/lang/String;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/ui/dialog/g0;->g:Ljava/lang/String;

    return-object p0
.end method


# virtual methods
.method public a()V
    .locals 2

    .line 3
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/g0;->b:Lcom/estrongs/android/ui/dialog/q;

    if-eqz v0, :cond_2

    .line 4
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/g0;->d:Landroid/widget/EditText;

    if-eqz v0, :cond_0

    const/4 v1, 0x1

    .line 5
    invoke-virtual {v0, v1}, Landroid/widget/EditText;->setSelectAllOnFocus(Z)V

    .line 6
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/g0;->d:Landroid/widget/EditText;

    invoke-virtual {v0}, Landroid/widget/EditText;->requestFocus()Z

    .line 7
    :cond_0
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/g0;->b:Lcom/estrongs/android/ui/dialog/q;

    invoke-virtual {v0}, Landroid/app/Dialog;->getWindow()Landroid/view/Window;

    move-result-object v0

    if-eqz v0, :cond_1

    const/4 v1, 0x5

    .line 8
    invoke-virtual {v0, v1}, Landroid/view/Window;->setSoftInputMode(I)V

    .line 9
    :cond_1
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/g0;->b:Lcom/estrongs/android/ui/dialog/q;

    invoke-virtual {v0}, Lcom/estrongs/android/ui/dialog/q;->show()V

    :cond_2
    return-void
.end method
